Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the docs for Google pub/sub #564

Closed
wants to merge 2 commits into from
Closed

Update the docs for Google pub/sub #564

wants to merge 2 commits into from

Conversation

somtochiama
Copy link
Member

@somtochiama somtochiama commented Jun 27, 2023

This pull request updates the Google pub/sub documentation to have the address in the referenced Provider secret instead of the spec. This is because the address for Google Pub/Sub is the project-id and fails the URL validation for the field.

We should also reconsider the validation for the spec.address field and how the current validation prevents some values from being specified in the spec. Some Providers (e.g. Azure EventHub) have address values that wouldn't pass the validation and use the address field instead of the secret instead. But this can come up after there has been some discussion around possible solutions.

Signed-off-by: Somtochi Onyekwere <[email protected]>
Signed-off-by: Somtochi Onyekwere <[email protected]>
Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, thanks for catching this @somtochiama!

Looks like the only way to make this provider work right now is by not specifying spec.address (which is optional, despite the ^(http|https)://.*$ validation), and specifying the address on a secret, as you said. Thanks for fixing these docs!

I'd definitely vote on lifting the URL validation for this field from the CRD, looks like it doesn't make sense anymore. By the way, even though right now this field is optional in the CRD, the event handler in fact errors out and skips the alert in case both this field and the address field on the referenced secret are empty:

if webhook == "" {
alertLogger.Error(nil, "provider has no address")
continue
}

Hence the address field is mandatory in practice. Setting spec.address to http:// (or https://) and the real address in the secret would be super weird.

@matheuscscp
Copy link
Member

@somtochiama I opened #565 for lifting the HTTP/S validation. In case it's approved/merged, I think we don't need to update the docs like this anymore

@stefanprodan
Copy link
Member

Closing in favour of #565

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants